<script language="javascript" type="text/javascript">
	$(function(){
		$(".button").button().addClass("right").click(function(){
			$(this).parent().slideUp().next().fadeIn();
		});
	});
	function back(object){
		
		object.parent().slideDown().prev().fadeIn();
		$("#step2>div").hide();
	}
	function checkAll(object){
		$("input[name=reset]").each(function(){
			if($(object).attr("checked") == true){
				$(this).attr("checked",true);
			}else{
				$(this).attr("checked",false);
			}
		});
	}

	function getSelectedInfo(){
	    var str = '';
	    $("input[name='reset']").each(function(i){
	        if($(this).attr('checked') == true){
	            str += ','+$(this).val();
	        }
	        
	    });
	    
	    //str = str.substr(1,str.length());
	    str = str.substring(1);
	    arr = str.split(',');
	    return arr;
	}
		
</script>
<div class="column1 colborder">
	<div class="box">
		<?php $this->beginWidget('zii.widgets.CPortlet', array('title'=>Yii::t('admin','Tags Reset')));?>
			<div class="box-content">
				
				<div id="stepLoading" class="hide">loading……</div>
				<div id="step0">
					
					标签数据重置相关提示：
					<ol>
						<li>此操作用于完成可能由于数据在增加时文章或其他媒体描述标签更新不同步的问题。</li>
					</ol>
					
					单击下一步，选择要重置的数据<br /><br />
					<hr />
					<button type="button" class="button">下一步</button>
					<div class="clear"></div>
				</div>
				<div id="step1" class="hide">		
									
						请选择准备同步的数据<hr />
						<input type="checkbox" id="reset_all" value="all" onclick="checkAll($(this));">所有数据
						<ul>
							<li><input type="checkbox" name="reset" value="article" />文章标签</li>
							<li><input type="checkbox" name="reset" value="gallery" />图集</li>
							
						</ul>
						<br />
						<hr />	
					<button type="button" class="button" onclick="chooseType();">重置开始</button>
					<button type="button" class="button" onclick="back($(this));">上一步</button>
						
					<div class="clear"></div>
				</div>
			</div>
		<?php $this->endWidget();?>
	</div>
</div>

<div class="column2">
	<div class="box">
		<?php $this->beginWidget('zii.widgets.CPortlet', array('title'=>'Restore Data',	));?>
			<div class="box-content" id="dblist">
			
			</div>		
		<?php $this->endWidget();?>	
	</div>

</div>